<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>FreeBSD News Flash</title>
    <link>https://www.FreeBSD.org/news/</link>
    <description>News from the FreeBSD Project</description>
    <language>en-us</language>
    <webMaster>freebsd-www@FreeBSD.org (Webmaster Team)</webMaster>
    <managingEditor>freebsd-www@FreeBSD.org (Webmaster Team)</managingEditor>
    <image>
      <url>https://www.FreeBSD.org/logo/logo-full.png</url>
      <title>FreeBSD News Flash</title>
      <link>https://www.FreeBSD.org/news/</link>
    </image>
    <atom:link href="https://www.FreeBSD.org/news/feed.xml" rel="self" type="application/rss+xml"/>
    {{ $data := index .Site.Data "en" }}
    {{ $newsData := $data.news }}
    {{ with $newsData.news }}
      {{ $newsCounter := 0 }}
      {{ $newsDayCounter := 1 }}
      {{ $newsDayPrev := false }}
        {{ range (sort .news "date" "desc") }}
          {{ if lt $newsCounter 10 }}
            {{ $newsDayCur := dateFormat "2006-01-02" .date }}
            {{ if eq $newsDayCur $newsDayPrev }}
              {{ $newsDayCounter = add $newsDayCounter 1 }}
            {{ else }}
              {{ $newsDayCounter = 1 }}
            {{ end }}
            <item>
              {{ if .title }}
                <title>
                  {{ $title := replaceRE "<a .*\">" "" .title }}
                  {{ $title = replaceRE "</a>" "" $title }}
                  {{ $title }}
                </title>
              {{ end }}
              {{ if .description }}
                <description>
                  {{ $description := replaceRE "<a .*\">" "" .description | safeHTML}}
                  {{ $description = replaceRE "</a>" "" $description | safeHTML}}
                  {{ $description }}
                </description>
              {{ end }}
              <link>{{ absLangURL ($.Site.BaseURL) }}news/newsflash/#{{ dateFormat "2006-01-02" .date }}:{{ $newsDayCounter }}</link>
              <guid>{{ absLangURL ($.Site.BaseURL) }}news/newsflash/#{{ dateFormat "2006-01-02" .date }}:{{ $newsDayCounter }}</guid>
              <pubDate>{{ dateFormat "2006-01-02" .date }}</pubDate>
            </item>
            {{ $newsCounter = add $newsCounter 1 }}
            {{ $newsDayPrev = $newsDayCur }}
          {{ end }}
      {{ end }}
    {{ end }}
  </channel>
</rss>
